In relevant art, the application circuit diagram of a typical flyback switching power supply is shown as FIG. 1, in which the feedback sampling of an output is generally achieved by adopting sampling feedback with an auxiliary winding of a transformer. Wherein, FIG. 2 is a structural block diagram of a primary control chip in the typical switching power supply.
By combining FIG. 1 and FIG. 2, constant voltage of a system is realized in such a way that the secondary voltage is sampled by the auxiliary winding, the sampled output voltage is provided to an error amplifier as an input and is subjected to error amplification with a reference voltage, and the turn-on time and the operation frequency of an external power switch are finally controlled. The loop compensation is mainly achieved by adding a compensation capacitor Cea to the output end of the error amplifier. However, the compensation method may cause the problem that the output ripple is too large because the loop cannot be stable within a range from light load to idle load.